#include <bits/stdc++.h>

template <typename FwdIter,
          class Comp = std::less<typename std::iterator_traits<FwdIter>
                                 ::value_type> >
void selectSort(FwdIter begin, FwdIter end, Comp cmp = Comp()) {
    while (end != begin) {
        auto it = std::max_element(begin, end, cmp);
        std::iter_swap(it, --end);
    }
}

int main() {
    std::vector<int> a;
    int n;
    std::cin >> n;
    std::copy_n(std::istream_iterator<int>(std::cin), n, std::back_inserter(a));
    selectSort(a.begin(), a.end());
    std::copy(a.begin(), a.end(), std::ostream_iterator<int>(std::cout, " "));
    std::cout << std::endl;
}

